// AssemblerFactoryImp.cpp: implementation of the AssemblerFactoryImp class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
//#include "resource.h"
#include "AssemblerFactoryImp.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

EquipAssembler* AssemblerFactoryImp::m_pEquipAssembler = NULL;
NozzleAssembler* AssemblerFactoryImp::m_pNozzleAssembler = NULL;

AssemblerFactory* GetEquipAssemblerFactory()
{
	static AssemblerFactoryImp EquipAss;
	return &EquipAss;
}

AssemblerFactoryImp::AssemblerFactoryImp()
{
	if (m_pEquipAssembler == NULL)
	{
		m_pEquipAssembler = new AutoCADEquipAssembler;
	}

	if (m_pNozzleAssembler == NULL)
	{
		m_pNozzleAssembler = new AutoCADNozzleAssembler;
	}
}

AssemblerFactoryImp::~AssemblerFactoryImp()
{
	delete m_pNozzleAssembler;
	m_pNozzleAssembler = NULL;

	delete m_pEquipAssembler;
	m_pEquipAssembler = NULL;
}

EquipAssembler* AssemblerFactoryImp::GetEquipAssembler()
{
	return m_pEquipAssembler;
}

NozzleAssembler* AssemblerFactoryImp::GetNozzleAssembler()
{
	return m_pNozzleAssembler;
}